﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PersonalWebsite.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class init6 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Show",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 70, DateTimeKind.Local).AddTicks(4773),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(6716),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_ProExperience",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 68, DateTimeKind.Local).AddTicks(6606),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(1002),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_HotMovie",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 70, DateTimeKind.Local).AddTicks(186),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(5423),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_GameVideo",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 69, DateTimeKind.Local).AddTicks(5977),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(4140),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Book",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 69, DateTimeKind.Local).AddTicks(1739),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(2720),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Ability",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 68, DateTimeKind.Local).AddTicks(1605),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 828, DateTimeKind.Local).AddTicks(9634),
                oldComment: "创建时间");

            migrationBuilder.CreateTable(
                name: "WS_TgaGame",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false, comment: "主键")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: false, comment: "名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Country = table.Column<string>(type: "varchar(10)", maxLength: 10, nullable: true, comment: "国家")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Desc = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false, comment: "描述")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AwardTime = table.Column<string>(type: "longtext", nullable: false, comment: "获奖时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PublishTime = table.Column<string>(type: "longtext", nullable: false, comment: "发布时间")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Cover = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false, comment: "封面")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Video = table.Column<string>(type: "longtext", nullable: true, comment: "宣传片链接")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DeleteTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    IsDeleted = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "删除标识"),
                    DeletorId = table.Column<int>(type: "int", nullable: true, comment: "删除人"),
                    CreatorId = table.Column<int>(type: "int", nullable: false, comment: "创建人"),
                    CreateTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, defaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 70, DateTimeKind.Local).AddTicks(9205), comment: "创建时间"),
                    EditorId = table.Column<int>(type: "int", nullable: true, comment: "编辑人"),
                    EditorTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "编辑时间")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_WS_TgaGame", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "WS_TgaGame");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Show",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(6716),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 70, DateTimeKind.Local).AddTicks(4773),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_ProExperience",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(1002),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 68, DateTimeKind.Local).AddTicks(6606),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_HotMovie",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(5423),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 70, DateTimeKind.Local).AddTicks(186),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_GameVideo",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(4140),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 69, DateTimeKind.Local).AddTicks(5977),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Book",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 829, DateTimeKind.Local).AddTicks(2720),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 69, DateTimeKind.Local).AddTicks(1739),
                oldComment: "创建时间");

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                table: "WS_Ability",
                type: "datetime(6)",
                nullable: false,
                defaultValue: new DateTime(2025, 3, 12, 18, 48, 55, 828, DateTimeKind.Local).AddTicks(9634),
                comment: "创建时间",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldDefaultValue: new DateTime(2025, 3, 12, 19, 3, 41, 68, DateTimeKind.Local).AddTicks(1605),
                oldComment: "创建时间");
        }
    }
}
